package com.game.framework.common;

public enum AwardTypeEnum {
    NO_AWARD(0,"无奖品"),
    OBJECT(1,"藏品"),
    BLIND_BOX(2,"盲盒"),
    MATERIAL(3,"实物"),
    TALENT_CARD(4,"天赋卡"),
    COUPON(5,"优惠券");

    private final int type;
    private final String desc;

    AwardTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }


    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }


    public static AwardTypeEnum get(Integer type) {
        switch (type) {
            case 1:
                return OBJECT;
            case 2:
                return BLIND_BOX;
            case 3:
                return MATERIAL;
            case 4:
                return TALENT_CARD;
            case 5:
                return COUPON;
            case 0:
            default:
                return NO_AWARD;
        }
    }

    public static String getDesc(Integer type) {
        switch (type) {
            case 1:
                return OBJECT.desc;
            case 2:
                return BLIND_BOX.desc;
            case 3:
                return MATERIAL.desc;
            case 4:
                return TALENT_CARD.desc;
            case 5:
                return COUPON.desc;
            case 0:
            default:
                return NO_AWARD.desc;
        }
    }
}
